<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "category".
 *
 * @property string $id
 * @property string $parent_id
 * @property string $name
 * @property string $desc
 * @property string $image
 * @property integer $sort
 * @property string $sign
 * @property string $app_id
 * @property integer $create_time
 */
class Category extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'category';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['sort', 'create_time'], 'integer'],
            [['id', 'parent_id', 'name', 'desc', 'sign', 'app_id'], 'string', 'max' => 36],
            [['image'], 'string', 'max' => 1024],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'parent_id' => 'Parent ID',
            'name' => 'Name',
            'desc' => 'Desc',
            'image' => 'Image',
            'sort' => 'Sort',
            'sign' => 'Sign',
            'app_id' => 'App ID',
            'create_time' => 'Create Time',
        ];
    }
}
